package cn.ymatou.admin.falcon.service;

import java.util.ArrayList;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;

import cn.ymatou.admin.falcon.parameter.ReportData;
import cn.ymatou.admin.falcon.parameter.echarts.GroupChart;
/**
*GetReport
*FreeMaker Template自动生成代码
*/
public class FindAllCall extends YmatouBaseCall{
	private static String opurl ="appConfig/findAll";
	
	public FindAllCall() {
		super(EnvSetup.getSystemUrl("falcon"),opurl,"GET","PARAM");
	}
//	@Override
//	public void addDefHeader() {
//		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
//		client.addHeader("Content-Type", "application/json; charset=UTF-8");
//	}
	public ArrayList<String> getResult() {
		ArrayList<String> result =new ArrayList<String>();
		try {
			result = (ArrayList<String>) new Gson().fromJson(getJsonObject().get("content").getAsJsonArray().toString(), new TypeToken<ArrayList<String>>() {}.getType());
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}
}